package com.zimi.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统组织机构 model
 *
 * @author lnintr
 * @since 2019-05-25
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysOrg对象", description = "系统组织机构")
public class SysOrg extends Model<SysOrg> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "机构全称")
    private String orgName;

    @ApiModelProperty(value = "父机构")
    private Integer orgPid;

    @ApiModelProperty(value = "机构根节点编号")
    private Integer ognId;

    @ApiModelProperty(value = "机构分类")
    private Integer orgCate;

    @ApiModelProperty(value = "机构排序")
    private Integer orgSort;

    @ApiModelProperty(value = "机构地址")
    private String orgAdd;

    @ApiModelProperty(value = "默认岗位名称")
    private String postName;
//
//    @ApiModelProperty(value = "图片")
//    private Integer fileId;

    @ApiModelProperty(value = "统一社会信用代码")
    private String orgCreditCode;

    @ApiModelProperty(value = "机构备注")
    private String orgRemark;

    @ApiModelProperty(value = "机构状态:1:有效 ；2：失效")
    private Integer orgState;

    @ApiModelProperty(value = "公开状态：1：（默认）公开； 2: 半公开；3：不公开")
    private Integer open;

    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    private Integer updateUser;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return id;
    }

}
